<%@ taglib prefix="spring" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@page contentType="text/html; charset=UTF-8" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>导航栏</title>
    <spring:url value="/resources/core/css/bootstrap.min.css"
                var="bootstrapCss"/>
    <link href="${bootstrapCss}" rel="stylesheet"/>
    <script src="<c:url value="/resources/core/js/jquery-3.1.1.min.js" />"></script>
    <script src="<c:url value="/resources/core/js/bootstrap.min.js" />"></script>
    <script src="<c:url value="/resources/core/js/onclock.js" />"></script>
    <script src="<c:url value="/resources/core/js/register.js" />"></script>
    <script src="<c:url value="/resources/core/js/My97DatePicker/WdatePicker.js" />"></script>
</head>

<body>
<%
    request.setCharacterEncoding("utf-8");
    String errorInfo = (String) session.getAttribute("errorInfo");
    String content = (String) session.getAttribute("content");
%>

<nav class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed"
                    data-toggle="collapse" data-target="#bs-example-navbar-collapse-1"
                    aria-expanded="false">
                <span class="sr-only">Toggle navigation</span> <span
                    class="icon-bar"></span> <span class="icon-bar"></span> <span
                    class="icon-bar"></span>
            </button>
            <a class="navbar-brand">NYTalk企业云盘</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse"
             id="bs-example-navbar-collapse-1">

            <ul class="nav navbar-nav">
                <li><a id="MySkyDriver" href="/disktalk/file/list">我的网盘 <span
                        class="sr-only">(current)</span>
                </a></li>
                <li><a id="fileUpload" href="/disktalk/file/index">文件上传</a></li>

                <!-- 	<li><a id="NewFile" href="/disktalk/file/searchPage?content='share'">文件搜索</a></li> -->

                <li><a id="NewFile" onclick="NewFileSearch()"
                       data-toggle="modal" data-target="#myModal">文件搜索</a></li>

                <li><a id="recoveryList" href="/disktalk/file/recoveryList?">回收站</a></li>

                <li><a href="/disktalk/user/logout">注销</a></li>

              <%--  <li class="dropdown"><a href="#" class="dropdown-toggle" data-toggle="dropdown"> 设置 <b
                        class="caret"></b>
                    <ul class="dropdown-menu">
                        <li><a href="/disktalk/user/logout">注销</a></li>
                        <li><a href="#">EJB</a></li>
                        <li><a href="#">Jasper Report</a></li>
                        <li class="divider"></li>
                        <li><a href="#">分离的链接</a></li>
                        <li><a href="#">另一个分离的链接</a></li>
                    </ul>
                </a>
                </li>--%>

            </ul>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container-fluid -->
</nav>
<div style="display: none;">
    <form method="post" action="/disktalk/file/upload" id="fromUpload"
          enctype="multipart/form-data">
        <input type="file" id="uploadFile" multiple="multiple"
               onclick="startUpload()"><br> <input type="submit"
                                                   value="文件上传" id="fileSubmit">
    </form>
</div>
<input type="hidden" id="fileUploadInfo" value="<%=errorInfo%>"/>
<button class="btn btn-primary btn-lg" data-toggle="modal"
        style="display: none;" data-target="#myModal">搜索
</button>
</body>
<div class="modal fade bs-example-modal-sm" id="myModal" tabindex="-1"
     role="dialog" aria-labelledby="mySmallModalLabel" aria-hidden="true">
    <div class="modal-dialog" style="width: 350px;">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"
                        aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
                <center>
                    <h4 class="modal-title" id="myModalLabel">文件搜索</h4>
                </center>
            </div>
            <form action="/disktalk/file/search" style="text-align: center;"
                  method="post">
                <div class="modal-body" style="margin: auto;">
                    <table style="text-align: center; margin: auto;">
                        <tr height="40px;">
                            <td>搜索类型:</td>
                            <td style="text-align: left;"><select name="searchValue">
                                <option value="0" selected="selected">自身文件</option>
                                <option value="1">回收文件</option>
                                <option value="2">分享文件</option>
                            </select></td>
                        </tr>
                        <tr height="40px;">
                            <td>文件名称:</td>
                            <td><input type="text" name="content"
                                       placeholder="请输入文件名称..."/></td>
                        </tr>
                    </table>
                </div>
                <div class="modal-footer">
                    <button type="submit" class="btn btn-primary" id="myform01"
                            style="margin-left: -80px;">搜索
                    </button>
                    <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                </div>
            </form>
        </div>
    </div>
</div>
</html>